<extend name="Public:common" />
<!--/sidebar-->
<block name="content">
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"> <i class="icon-font"></i>
                <a href="/Admin">首页</a>
                <span class="crumb-step">&gt;</span>
                <span class="crumb-name">用户管理</span>
            </div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="" method="get">
                    <table class="search-tab">
                        <tr>
                    <!--         <th width="120">选择分类:</th>
                            <td>
                                <select name="search" id="">
                                    <option value="">全部</option>
                                    <foreach name="Tarr" item="vo">
                                    <option value="{$vo.tid}">{$vo.tname}</option>
                                    </foreach>
                                </select>
                            </td> -->
                            <th width="70">关键字:</th>
                            <td>
                                <input class="common-text" placeholder="关键字" name="keywords" value="" id="" type="text"></td>
                            <td>
                                <input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                            <div class="result-title">
                    <div class="result-list">
                        <a href="__URL__/insert"><i class="icon-font"></i>新增作品</a>
                        <a id="batchDel" href="javascript:delAll()"><i class="icon-font"></i>批量删除</a>
                        <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%">
                            <input type="checkbox"  id="checkall" onclick="selectAll(this)"/>
                            <th>ID</th>
                            <th>电话</th>
                            <!-- <th>会员邮箱</th> -->
                            <th>推荐人ID</th>
                            <th>会员姓名</th>
                            <th>账户余额</th>
                            <th>冻结金钱</th>
                            <th>注册时间</th>
                            <th>会员状态</th>
                            <!-- <th>计划条款</th> -->
                            <!-- <th>加入人数</th> -->
                            <th>操作</th>
                        </tr>
                        <foreach name="Uarr" item="vo">
                        <tr>
                            <td class="tc">
                              <input type="checkbox" name="del" class="del"  value="<{$vo.uid}>"/></td>
                            <!-- <td>
                            <input name="ids[]" value="58" type="hidden">
                            <input class="common-input sort-input" name="ord[]" value="0" type="text"></td>
                        -->
                        <td><{$vo.uid}></td>
                        <td><{$vo.tel}></td>
                         <if condition="$vo.yaoqm neq '' ">    
                        <td><{$vo.yaoqm}></td>
                        <else /> <td style="color:green">无</td>
                        </if>
                     

                        <if condition="($vo.realname neq '') ">    
                        <td><{$vo.realname}></td>
                        <else /> <td style="color:green">未实名认证</td>
                        </if>
                        <if condition="($vo.yue eq '')"> <td>0</td>
                        <else /> <td><{$vo.yue}></td>
                        </if>
                        <td>{$vo.userid}</td>
                       
                        <td><{$vo.createtime|date="y-m-d",###}></td>
                         <if condition="($vo.status eq 0) ">    
                        <td>正常</td>
                        <else /> <td style="color:red">冻结</td>
                        </if>
                        <!-- <td><a href="__URL__/userjilu/user/{$vo.id}">交易详情</a></td> -->
<!--                    <if condition="($vo.status eq 0)"> <td>准备</td>
                        <elseif condition="$vo.status eq 1"/><td>开放</td>
                        <else /> <td>结束</td>
                        </if> -->
                        <!-- <td>{$vo.shou}</td> -->
                        <td>
                                                               <if condition="($vo.yaoqm eq '')"> 
                                    <else /> 
                                    <a class="link-update" href="<{:U('Admin/User/yaoqing/yid/'.$vo['yaoqm'])}>">邀请人</a>
                                    </if>
                            <a class="link-update" href="javascript:del(<{$vo['uid']}>)">删除</a>
                            <a class="link-update" href="<{:U('Admin/User/userinfo/id/'.$vo['uid'])}>">修改</a>
                            <if condition="$vo.stAus eq 0"> 
                               <a href="javascript:update(<{$vo['uid']}>,<{$vo['status']}>)">冻结</a>
                                <else /> 
                                <a href="javascript:update(<{$vo['uid']}>,<{$vo['status']}>)">解冻</a>
                            </if>
                        </td>
                    </tr>
                    </foreach>
                </table>
                <div class="list-page"><{$page}></div>
            </div>
        </form>
    </div>
</div>

<!--/main-->



<script type="text/javascript">
function update(id,sta) {
    $.MsgBox.Confirm("温馨提示", "执行修改确定继续吗？温馨提示", function () {
      $.post('__URL__/Update', {'sid':id,sta:sta}, function(data){
           $.MsgBox.Alert("消息", data);
                    location.reload([true])  
          });
        });
}
          function del(id){
            // $.MsgBox.Alert(1);
              $.MsgBox.Confirm("温馨提示", "执行删除后将无法恢复，确定继续吗？温馨提示", function () {
                $.post('__URL__/delete', {'sid':id}, function(data) {
                    $.MsgBox.Alert("消息", data);
                    location.reload([true])  
                });

         });
        }
            function selectAll(checkbox) {
                $('input[type=checkbox]').prop('checked', $(checkbox).prop('checked'));
            }
function delAll(){
    var idstr="";
    $('.del').each(function(){
        if($(this).prop("checked")){
            idstr+=","+$(this).val();
            }  
        })
     $.MsgBox.Confirm("温馨提示", "执行删除后将无法恢复，确定继续吗？温馨提示", function () {
    $.post('__URL__/delete',{"idstr":idstr,"action":"delAll"},function(data){
       $.MsgBox.Alert("消息", data);
        location.reload([true])  
        });
     });
}

</script>
</block>